/**
 * FileName: MainThreads
 * Author:   powersi
 * Date:     2021/3/10 22:21
 * Description:
 */
package com.zm.demo.core.jvm;

import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
import java.lang.management.ThreadMXBean;

/**
 * Description: 
 * Author:      powersi
 * Date:        2021/3/10 22:21
 */
public class MainThreads {

    public static void main(String[] args) {
        ThreadMXBean mxBean = ManagementFactory.getThreadMXBean();
        ThreadInfo[] threadInfos = mxBean.dumpAllThreads(false, false);
        for (ThreadInfo threadInfo : threadInfos) {
            System.out.println(threadInfo);
        }

    }
}
